package com.jiuwu.bluetoothlegatt;

/**
 * Created by zhangjun on 15/10/25.
 */
public class ByteUnit {

    public static String bytesToHexString(byte[] paramArrayOfByte)
    {
        StringBuilder localStringBuilder = new StringBuilder();
        if ((paramArrayOfByte == null) || (paramArrayOfByte.length <= 0))
            return null;
        for (int i = 0; i < paramArrayOfByte.length; i++)
        {
            String str = Integer.toHexString(0xFF & paramArrayOfByte[i]).toUpperCase();
            if (str.length() < 2)
                localStringBuilder.append(0);
            localStringBuilder.append(str);
        }
        return localStringBuilder.toString();
    }
}
